﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	
	<!-- Theme Brushes -->
	<SolidColorBrush x:Key="ThemePageHeaderBackgroundBrush" Color="Gray" />
	<SolidColorBrush x:Key="ThemePageHeaderForegroundColorBrush" Color="White" />
	
	<!-- Theme Styles -->
	<Style x:Key="ThemePageStyle" TargetType="Page">
		<Setter Property="MinWidth" Value="0" />
		<Setter Property="MinHeight" Value="0" />
		<Setter Property="Width" Value="Auto" />
		<Setter Property="Height" Value="Auto" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate>
					<Grid Background="White">
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto" />
							<RowDefinition Height="*" />
						</Grid.RowDefinitions>
						<StackPanel Grid.Row="0" Background="Gray" Height="37" VerticalAlignment="Top">
							<TextBlock TextWrapping="NoWrap" 
									   Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title}" 
									   FontSize="26.667" 
									   Height="36.923" 
									   Foreground="White" 
									   HorizontalAlignment="Center" 
									   VerticalAlignment="Top" />
						</StackPanel>
						<ScrollViewer
							Grid.Row="1"
							HorizontalAlignment="Stretch"
							VerticalAlignment="Stretch" Padding="20,20,20,0">
								<ContentPresenter 
								VerticalAlignment="Stretch"
								Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}" />
						</ScrollViewer>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="ButtonStyleGreen" TargetType="Button">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid ClipToBounds="True" Width="{Binding Width, RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Height, RelativeSource={RelativeSource TemplatedParent}}" >
						<Rectangle RadiusX="6" RadiusY="6" x:Name="back" Fill="YellowGreen" />
						<Border Margin="2" Padding="5" CornerRadius="6" x:Name="border" BorderThickness="2" BorderBrush="White">
							<TextBlock x:Name="text" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="20" Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter TargetName="back" Property="Fill" Value="Crimson" />
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter TargetName="back" Property="Fill" Value="LightSkyBlue" />
						</Trigger>
					</ControlTemplate.Triggers>
			</ControlTemplate>
		</Setter.Value>
	</Setter>
	</Style>
	
</ResourceDictionary>